首页> 外文OA文献 >Refactoring Legacy JavaScript Code to Use Classes: The Good, The Bad and The Ugly
【2h】

Refactoring Legacy JavaScript Code to Use Classes: The Good, The Bad and The Ugly

机译:重构传统Javascript代码以使用类:好,坏和   丑陋的

代理获取
本网站仅为用户提供外文OA文献查询和代理获取服务,本网站没有原文。下单后我们将采用程序或人工为您竭诚获取高质量的原文,但由于OA文献来源多样且变更频繁,仍可能出现获取不到、文献不完整或与标题不符等情况,如果获取不到我们将提供退款服务。请知悉。

摘要

JavaScript systems are becoming increasingly complex and large. To tackle thechallenges involved in implementing these systems, the language is evolving toinclude several constructions for programming- in-the-large. For example,although the language is prototype-based, the latest JavaScript standard, namedECMAScript 6 (ES6), provides native support for implementing classes. Eventhough most modern web browsers support ES6, only a very few applications usethe class syntax. In this paper, we analyze the process of migrating structuresthat emulate classes in legacy JavaScript code to adopt the new syntax forclasses introduced by ES6. We apply a set of migration rules on eight legacyJavaScript systems. In our study, we document: (a) cases that arestraightforward to migrate (the good parts); (b) cases that require manual andad-hoc migration (the bad parts); and (c) cases that cannot be migrated due tolimitations and restrictions of ES6 (the ugly parts). Six out of eight systems(75%) contain instances of bad and/or ugly cases. We also collect theperceptions of JavaScript developers about migrating their code to use the newsyntax for classes.
机译:JavaScript系统变得越来越复杂和庞大。为了解决实现这些系统所面临的挑战,该语言正在发展为包括几种用于大型编程的结构。例如,尽管该语言是基于原型的,但是最新的JavaScript标准ECMAScript 6(ES6)为实现类提供了本机支持。尽管大多数现代的Web浏览器都支持ES6,但是只有极少数的应用程序使用类语法。在本文中,我们分析了迁移模仿旧JavaScript代码中的类的结构以采用ES6引入的新语法的过程。我们在八个legacyJavaScript系统上应用了一套迁移规则。在我们的研究中,我们记录了:(a)直接迁移的案例(主要部分); (b)需要手动和临时迁移(不良部分)的情况; (c)由于ES6的限制和限制(丑陋的部分)而无法迁移的情况。八个系统中有六个(75%)包含不良和/或丑陋的案例。我们还收集了JavaScript开发人员对迁移其代码以对类使用新闻语法的看法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
代理获取

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号